﻿@model Zatify.WebUI.Admin.Models.BusinessBillingListViewModel
@{
    ViewBag.Title = "Business Billing";
    Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}
<!--start bradecums-->
<div class="bradecums_bar">
    Business Profile Screens <span>&raquo;</span>
    @((Model.BusinessId > 0) ? Model.BusinessName : "Add New Business")
    <span>&raquo;</span> General Info</div>
<!--end bradecums-->
<!--start button-->
<div class="zatify_panel_btn2">
    @Html.Partial("Partials/BusinessDetailsTabsControl", new BusinessDetailsTabsViewModel() { BusinessId = @Model.BusinessId, BusinessSection = BusinessSection.GeneralInfo })
    <div class="clearfix">
    </div>
</div>
<!--end button-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top: 20px;">
    <tr>
        <td width="15%">
            <h5>
                Transaction History</h5>
        </td>
        <td width="10%">
            @if (Model.PagingInfo.CurrentPage > 1)
            {
                <a href="@Url.Action("Billing", new { id = Model.BusinessId, page = (Model.PagingInfo.CurrentPage == 1 ? Model.PagingInfo.CurrentPage : (Model.PagingInfo.CurrentPage - 1)) })">
                    <img src="@Url.Content("~/Areas/Admin/Content/zatify/Images/previous_btn.jpg")" />
                </a>
            }
        </td>
        <td width="4%">
            &nbsp;
        </td>
        <td width="10%">
            @if (Model.PagingInfo.CurrentPage < Model.PagingInfo.TotalPages)
            {
                <a href="@Url.Action("Billing", new { id = Model.BusinessId, page = (Model.PagingInfo.CurrentPage == Model.PagingInfo.TotalPages ? Model.PagingInfo.CurrentPage : (Model.PagingInfo.CurrentPage + 1)) })">
                    <img src="@Url.Content("~/Areas/Admin/Content/zatify/Images/next_btn.jpg")" />
                </a>
            }
        </td>
        <td width="61%">
            &nbsp;
        </td>
    </tr>
</table>
<!--start promotions table-->
<div class="zatify_payment_info_tabel">
    <div class="zatify_table_content">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <th width="10%">
                    Date
                </th>
                <th width="12%">
                    Type
                </th>
                <th width="25%">
                    Description
                </th>
                <th width="12%">
                    Debit
                </th>
                <th width="13%">
                    Credit
                </th>
                <th width="10%">
                    Balance
                </th>
                <th width="18%">
                    Comments
                </th>
            </tr>
            @foreach (var billing in Model.Billing)
            {
                <tr>
                    <td>
                        @billing.Date.Value.ToString("MM/dd/yyyy")
                    </td>
                    <td>
                        @billing.Type
                    </td>
                    <td>
                        @billing.Description
                    </td>
                    <td style="text-align: right;">
                        @billing.Debit
                    </td>
                    <td style="text-align: right;">
                        @billing.Credit
                    </td>
                    <td style="text-align: right;">
                        @billing.Balance
                    </td>
                    <td>
                        @billing.Comments
                    </td>
                </tr>
            }
        </table>
    </div>
    <div class="clearfix">
    </div>
    <!--end promotions table-->
</div>
